<?php
namespace App\Mappers\Trade;

use App\Mappers\DataMapper;

class ShopMapper extends DataMapper
{

    public function make()
    {
        // 地址
        $this->offsetSet('province', $this->province);
        $this->offsetSet('city', $this->city);
        $this->offsetSet('area', $this->area);
        $this->offsetSet('town', $this->isValid('town') ? $this->town : null);
        $this->offsetSet('address', $this->isValid('address') ? $this->address : null);
        // 联系人
        $this->offsetSet('contact_name', $this->contact_name);
        $this->offsetSet('contact_mobile', $this->contact_mobile);
        
        return $this;
    }
}